const obj = {
  date: [1, 3, 5],
  teachers: {
    韩老师: "webpack",
    高老师: "react",
    夏老师: "nodejs,wechat,safe",
    厉老师: "flutter",
    盛老师: "test,interview,end,project,algorithm,pattern,react-src",
    杨老师: "vue",
    黄老师: "middle",
    罗老师: "rn"
  },
  details: [
    {
      title: "vue01组件化实践",
      content: `
          Vue组件化技术盘点
          组件设计原则
          表单控件设计与实现
          弹窗类组件设计与实现
          递归组件
          `,
      catg: "vue"
    },
    {
      title: "vue02全家桶原理",
      content: `
          Vue-router回顾
          vue-router原理与实现
          Vuex回顾
          vuex原理与实现
        `,
      catg: "vue"
    },

    {
      title: "vue03手撸Vue",
      content: `
          实现自己的vuejs
          响应式原理
          依赖收集
          模板编译
        `,
      catg: "vue"
    },
    {
      title: "vue04源码剖析1",
      content: `
        调试环境搭建
        vue初始化流程
        响应式原理
        `,
      catg: "vue"
    },
    {
      title: "vue05源码剖析2",
      content: `
        异步更新
        虚拟DOM
        `,
      catg: "vue"
    },
    {
      title: "vue06源码剖析3",
      content: `
        编译器原理
        自定义组件机制
        事件机制
          `,

      catg: "vue"
    },

    {
      title: "vue07最佳实践1",
      content: `
      项目配置
      文件结构
      权限控制
      `,
      catg: "vue"
    },
    {
      title: "vue08最佳实践2",
      content: `
      动态菜单生成
      服务封装
      数据Mock
      测试
      `,
      catg: "vue"
    },
    {
      title: "vue09SSR",
      content: `服务端渲染
      ssr原理
      vue ssr实战
      nuxt.js实战
      `,
      catg: "vue"
    },
    {
      title: "vue10SSR",
      content: `nuxt实战 + vue3尝鲜
      nuxt实战
      vue3环境配置
      composition api
      vue3响应式原理
      `,
      catg: "vue"
    },
    {
      title: "vue11TypeScript",
      content: `
          Typescript基础
          TS+Vue实战
          装饰器原理
        `,

      catg: "vue"
    },
    {
      title: "休息",
      content: `
      休息
          `,

      catg: "rest"
    },

    {
      title: "React01",
      content: "React入门",
      catg: "react"
    },
    {
      title: "React02",
      content: "React组件化",
      catg: "react"
    },
    {
      title: "React03",
      content: "React全家桶",
      catg: "react"
    },
    {
      title: "React04",
      content: "dva实战",
      catg: "react"
    },
    {
      title: "React05",
      content: "React电商项目实战01",
      catg: "react"
    },
    {
      title: "React06",
      content: "React电商项目实战02",

      catg: "react"
    },
    // {
    //   title:"React07",
    //   content:"React电商项目实战03",
    //   catg:'react',

    // },
    {
      title: "React07",
      content: "源码",
      catg: "react"
    },
    {
      title: "React08",
      content: "源码2",
      catg: "react"
    },

    {
      title: "Nodejs01",
      content: "Nodejs01",
      catg: "nodejs"
    },
    {
      title: "Nodejs02",
      content: "Nodejs02",
      catg: "nodejs"
    },
    {
      title: "Nodejs03",
      content: "Nodejs03",
      catg: "nodejs"
    },
    {
      title: "Nodejs04",
      content: "Nodejs04",
      catg: "nodejs"
    },
    {
      title: "Nodejs05",
      content: "Nodejs05",
      catg: "nodejs"
    },
    {
      title: "Nodejs06",
      content: "Nodejs06",
      catg: "nodejs"
    },
    {
      title: "Nodejs07",
      content: "Nodejs07",
      catg: "nodejs"
    },
    {
      title: "Nodejs08",
      content: "Nodejs08",
      catg: "nodejs"
    },
    {
      title: "Nodejs09",
      content: "Nodejs09",
      catg: "nodejs"
    },
    {
      title: "Nodejs10",
      content: "Nodejs10",
      catg: "nodejs"
    },
    {
      title: "微信公众号开发01",
      content: "微信公众号开发01",
      catg: "wechat"
    },
    // {
    //   title: '微信公众号开发02',
    //   content: '微信公众号开发02',
    //   catg: 'wechat'
    // },
    // {
    //   title: '微信公众号开发03',
    //   content: '微信公众号开发03',
    //   catg: 'wechat'
    // },
    // {
    //   title: '微信公众号开发04',
    //   content: '微信公众号开发04',
    //   catg: 'wechat'
    // },
    {
      title: "前端安全01",
      content: "前端安全01",
      catg: "safe"
    },
    {
      title: "阿里中台实践",
      content: "阿里中台分享",
      catg: "middle"
    },
    // {
    //   title: '项目01',
    //   content: '项目01',
    //   catg: 'test'
    // },
    // {
    //   title: '项目02',
    //   content: '项目01',
    //   catg: 'test'
    // },
    // {
    //   title: '项目03',
    //   content: '项目01',
    //   catg: 'test'
    // },
    // {
    //   title: '项目04',
    //   content: '项目01',
    //   catg: 'test'
    // },
    // {
    //   title: '前端安全02',
    //   content: '前端安全02',
    //   catg: 'safe'
    // },
    {
      title: "工程化01",
      content: "工程化01",
      catg: "webpack"
    },
    {
      title: "工程化02 进阶",
      content: "工程化02",
      catg: "webpack"
    },
    {
      title: "工程化03",
      content: "webpack性能优化",
      catg: "webpack"
    },
    {
      title: "工程化04",
      content: "webpack性能优化",
      catg: "webpack"
    },
    {
      title: "工程化05",
      content: "webpack源码",
      catg: "webpack"
    },

    {
      title: "React-native01",
      content: "React-native01",
      catg: "rn"
    },
    {
      title: "React-native02",
      content: "React-native02",
      catg: "rn"
    },
    {
      title: "React-native03",
      content: "React-native03",
      catg: "rn"
    },
    {
      title: "React-native04",
      content: "React-native04",
      catg: "rn"
    },
    {
      title: "React-native05",
      content: "React-native05",
      catg: "rn"
    },
    {
      title: "flutter-01",
      content: "flutter实战",
      catg: "flutter"
    },
    {
      title: "flutter-02",
      content: "flutter实战",
      catg: "flutter"
    },
    {
      title: "flutter-03",
      content: "flutter实战",
      catg: "flutter"
    },
    {
      title: "休息",
      content: `
      休息
          `,

      catg: "rest"
    },
    {
      title: "flutter-04",
      content: "flutter实战",
      catg: "flutter"
    },
    {
      title: "flutter-05",
      content: "flutter实战",
      catg: "flutter"
    },
    {
      title: "flutter-06",
      content: "flutter实战",
      catg: "flutter"
    },
{
      title: "flutter-07",
      content: "flutter实战",
      catg: "flutter"
    },

    {
      title: "小程序01",
      content: "小程序入门",
      catg: "mp"
    },
    {
      title: "小程序02",
      content: "小程序入门",
      catg: "mp"
    },
    //  {
    //   title: '性能优化01',
    //   content: '性能优化01',
    //   catg: 'perf'
    // },

    {
      title: "前端自动化测试01",
      content: "前端自动化测试01",
      catg: "test"
    },

    {
      title: "React源码剖析01",
      content: "源码剖析",
      catg: "react-src"
    },

    {
      title: "React源码剖析02",
      content: "源码剖析",
      catg: "react-src"
    },

    {
      title: "项目01",
      content: "项目架构介绍",
      catg: "project"
    },
    {
      title: "项目02",
      content: "项目核心难点+训练营模式学习",
      catg: "project"
    },

    {
      title: "面试",
      content: "面试",
      catg: "interview"
    },
    {
      title: "结课",
      content: "结课",
      catg: "end"
    }
  ]
};
const catgTeachers = {};
Object.entries(obj.teachers).forEach(val => {
  const [name, catg] = val;
  catg.split(",").forEach(v => {
    catgTeachers[v] = name;
  });
});
obj.details.map(v => {
  v.teacher = catgTeachers[v.catg];
  return v;
});
console.log("15", obj.details.length);

export default obj;
